Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Browser-friendly enhanced path
fully compatible with standard node.js
path
A lightweight, cross-platform library for manipulating paths.
This package modifies and enhances the standard path
from node.js
import { Path } from 'path.js';
// Default constructor with optional string or object parameter
const myPath = new Path('custom_separator'); // String: sets custom path separator
const myPathWithOptions = new Path({
sep: 'custom_separator', // Custom path separator
delimiter: 'custom_delimiter', // Custom path delimiter
splitPathReStr: 'custom_regular_expression', // Custom regular expression for splitting paths
});
Properties
Methods
import { WinPath } from 'path.js';
import path from 'path.js';
// path.win32
const winPath = new WinPath();
import { PosixPath } from 'path.js';
import path from 'path.js';
// path.posix
const posixPath = new PosixPath();
import { Path, WinPath, PosixPath } from 'path.js';
import path from 'path.js';
// Using the default Path class
const _path = new Path();
console.log(_path.normalize('/path/to/../file.ext')); // '/path/file.ext'
// Using the WinPath subclass or path.win32
const winPath = new WinPath();
console.log(winPath.normalize('C:\\path\\to\\..\\file.ext')); // 'C:\path\file.ext'
// Using the PosixPath subclass or path.posix
const posixPath = new PosixPath();
console.log(posixPath.normalize('/path/to/../file.ext')); // '/path/file.ext'
FAQs
Browser-friendly enhanced path fully compatible with standard node.js
The npm package path.js receives a total of 5,923 weekly downloads. As such, path.js popularity was classified as popular.
We found that path.js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.